Bayesian spiking neurons I: inference